﻿using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Linq;
using System.Text;

namespace CipherLib.Tools
{
    class EnumBuilder
    {
        /// <summary>
        /// Enum-builder for Dynamics Ax 4.0 (StoreName)
        /// </summary>
        /// <param name="storeName">The string that correspond to the enum-type</param>
        /// <returns></returns>
        public static StoreName BuildStoreName(string storeName)
        {
            return (StoreName)Enum.Parse(typeof(StoreName), storeName);
        }

        /// <summary>
        /// Enum-builder for Dynamics Ax 4.0 (StoreLocation)
        /// </summary>
        /// <param name="storeLocation">The string that correspond to the enum-type</param>
        /// <returns></returns>
        public static StoreLocation BuildStoreLocation(string storeLocation)
        {
            return (StoreLocation)Enum.Parse(typeof(StoreLocation), storeLocation);
        }
    }
}
